// 类型14： 声明一个类
class Person {
    // 将来实例的属性
    uname: string;
    uage: number;

    // 公开的
    // public version: string  = 'v1.0.0';
    // 受保护的，不允许在类外面用
    // protected version: string  = 'v1.0.0';
    // 私有的
    private version: string  = 'v1.0.0';

    // 参数的参数
    constructor(name: string, age: number) {
        this.uname = name;
        this.uage = age;
    }
}

// const b1 = new Person('吴彦祖', 18);
// console.log(b1);

// const b2 = new Person('易烊千玺', 16);
// console.log(b2);

class BoyFriend extends Person {
    money: number;
    house: number;
    protected car: string;
    cook: boolean;

    constructor(
        name: string, 
        age: number,
        mon: number,
        hou: number,
        car: string,
        coo: boolean
    ) {
        super(name, age);

        this.money = mon;
        this.house = hou;
        this.car = car;
        this.cook = coo
    }

    log() {
        // console.log(this.version);
    }
}

const b1 = new BoyFriend('岳云鹏', 35, 2000, 0.5, '老头乐', false);
console.log(b1);
// b1.log();
// console.log(b1.version);
// console.log(b1.car);




